<?php
/**
 * 发货单处理
 *
 * @category 
 * @package 
 * @author chenping<chenping@shopex.cn>
 * @version $Id: Z
 */
class erpapi_shop_matrix_beibei_request_delivery extends erpapi_shop_request_delivery
{

	protected function get_confirm_params($sdf)
    {
        $param = parent::get_confirm_params($sdf);
        // 拆单子单回写
        
        if($sdf['is_split'] == 1) {
            $item_list = array();
            foreach ($sdf['delivery_items'] as $item){
             
                $arr = array();
                $arr['outer_id'] = $item['shop_goods_bn'];
                $arr['num'] = $item['nums'];
                $item_list[] = $arr;
            }

            $param['order_items'] = json_encode($item_list);
        }
        
        return $param;
    }

}